package com.dwxt.community.controller.supervisor;

import com.dwxt.common.base.*;
import com.dwxt.community.aiequipment.aibin.entity.TrashCan;
import com.dwxt.community.aiequipment.aibin.service.*;
import com.dwxt.community.service.supervisor.TrashInnerService;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;

/**
 * @program: intelligentcity
 * @description: 智能垃圾箱控制层
 * @create: 2020/04/17
 */
@RestController
@RequestMapping("/cms/supervisorAibin")
public class AiBinController {

    @Autowired
    private TrashCanService trashCanService;
    @Autowired
    private TrashInnerService trashInnerService;

    /**
     * showdoc
     *
     * @param pageNum 非必须 Integer 当前页
     * @param pageSize 非必须 Integer 每页显示条数
     * @return {"status":200,"msg":"SUCCESS","data":{"total":1,"list":[{"deviceId":"431966353339464D05D8FF33","address":"1,聚金万佳苑,10栋32-6","waterLine":12,"temperature":40,"weight":30,"wsTime":1587069538000,"iccId":"iccid"}],"pageNum":1,"pageSize":10,"size":1,"startRow":1,"endRow":1,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
     * @catalog 社区/督导员-巡检员/智能垃圾箱
     * @title 垃圾箱列表
     * @method get
     * @description 垃圾箱列表
     * @url /cms/supervisorAibin/get
     */
    @RequestMapping("/get")
    public BaseResult get(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize) {
        return BaseResult.ok(trashInnerService.selectAll(pageNum, pageSize));
    }


}
